package com.mls.fivedistrict.server.impl;

import com.mls.fivedistrict.dao.LoseRecordMapper;
import com.mls.fivedistrict.pojo.LoseRecord;
import com.mls.fivedistrict.pojo.Record;
import com.mls.fivedistrict.server.LoseRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chenxiuxiang on 2018/5/10.
 */
@Service("loseRecordService")
public class LoseRecordServiceImpl implements LoseRecordService {

    @Autowired
    LoseRecordMapper loseRecordMapper;

    @Override
    public int addLoseRecord(LoseRecord loseRecord) {
        int i = loseRecordMapper.insertSelective(loseRecord);
        return i;
    }

    @Override
    public int insertBash(List<Record> records) {
        int i = loseRecordMapper.insertBatch(records);
        return i;
    }
}
